///alter entidad
ALTER TABLE [dbo].[ENTIDAD]
	DROP CONSTRAINT [FK_CONEXION]
go
ALTER TABLE ENTIDAD
	DROP COLUMN idConexion
go
//ok
//anter informe
ALTER TABLE [dbo].[INFORME]
	DROP CONSTRAINT [FK_ENTIDAD]
go
ALTER TABLE [dbo].[INFORME]
	DROP COLUMN [IDENTIDAD]
GO

ALTER TABLE [dbo].[INFORME]
	ADD [IDCONEXION] int NULL
GO

ALTER TABLE [dbo].[INFORME]
	ADD [JRXML] image NULL
GO

ALTER TABLE [dbo].[INFORME]
	ADD [TIPOINFORMEDEFECTO] int NULL
GO

///
UPDATE [IGFORMATOPRO].[dbo].[INFORME]
SET [IDCONEXION]=6
GO

ALTER TABLE [dbo].[INFORME]
	ADD CONSTRAINT [FK_CONEXION_1]
	FOREIGN KEY([IDCONEXION])
	REFERENCES [dbo].[CONEXION]([ID])
GO

ALTER TABLE [dbo].[INFORME] ALTER COLUMN [CONSULTA] image NULL
GO

//////
SELECT * FROM CONEXION
go
SELECT * FROM ENTIDAD
go
SELECT ID,NOMBRE,IDENTIDAD FROM INFORME
go
//